package com.engine4cloud.tdf.supervision.controller.inner;

import com.engine4cloud.tdf.common.core.util.R;
import com.engine4cloud.tdf.common.log.annotation.SysLog;
import com.engine4cloud.tdf.common.security.annotation.Inner;
import com.engine4cloud.tdf.supervision.dto.SpAccessSpecificVerifyDTO;
import com.engine4cloud.tdf.supervision.dto.result.SpAccessSpecificResultDTO;
import com.engine4cloud.tdf.supervision.service.SpAccessSpecificService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.validation.Valid;
import lombok.RequiredArgsConstructor;
import org.springframework.http.HttpHeaders;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 审批-进入特定区域管理-inner
 *
 * @author wenjie
 * @date 2024-04-08 14:33:54
 */
@RestController
@RequiredArgsConstructor
@RequestMapping("/inner/access/specific")
@Tag(description = "OutApplicationWeb", name = "审批-进入特定区域管理-inner")
@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
public class SpAccessSpecificInnerController {

    private final SpAccessSpecificService accessSpecificService;

    /**
     * 查询矫正对象进入特定区域信息
     *
     * @param dto dto
     * @return R
     */
    @Inner
    @Operation(summary = "查询矫正对象进入特定区域信息", description = "查询矫正对象进入特定区域信息")
    @SysLog("查询矫正对象进入特定区域信息")
    @PostMapping("/list")
    public R<List<SpAccessSpecificResultDTO>> findListByPreActions(@Valid @RequestBody SpAccessSpecificVerifyDTO dto) {
        return R.ok(accessSpecificService.findListByPreActions(dto));
    }
}